using System.ComponentModel;
using BTOps;

/// <summary>
/// Summary description for BTSendPortOperations
/// </summary>
[DataObject]
public class BTSendPortOperations
{
    [DataObjectMethod(DataObjectMethodType.Select, true)]
    public BTSendPort[] ListSendPorts(string applicationName)
    {
        Operations btOps = new Operations();
        return btOps.SendPorts(applicationName, "");
    }

    [DataObjectMethod(DataObjectMethodType.Select, false)]
    public BTSendPort[] SendPortByName(string applicationName, string name)
    {
        Operations btOps = new Operations();
        return btOps.SendPorts(applicationName, name);
    }

    [DataObjectMethod(DataObjectMethodType.Insert, true)]
    public void CreateSendPort(BTSendPort sendPort)
    {
        Operations btOps = new Operations();
        btOps.CreateSendPort(sendPort);
    }

    [DataObjectMethod(DataObjectMethodType.Update, true)]
    public void UpdateSendPort(BTSendPort sendPort)
    {
        Operations btOps = new Operations();
        btOps.UpdateSendPort(sendPort);
    }

    [DataObjectMethod(DataObjectMethodType.Delete, true)]
    public void DeleteSendPort(BTSendPort sendPort)
    {
        Operations btOps = new Operations();
        btOps.DeleteSendPort(sendPort);
    }
}